//
//  RHCommons.swift
//  微博新浪
//
//  Created by hezerong on 16/6/10.
//  Copyright © 2016年 Rocky. All rights reserved.
//

import UIKit

let screenBounds = UIScreen.mainScreen().bounds
let screenWidth = UIScreen.mainScreen().bounds.size.width
let screenHeight = UIScreen.mainScreen().bounds.size.height
let screenScale = UIScreen.mainScreen().scale


let globalColor = UIColor.orangeColor()


/// 登录、授权成功通知字符串
let oauthSuccessNotification = "oauthDidSuccessNotification"

//延时加载

func delay(time:Double,closure:()->()){

let delay = dispatch_time(DISPATCH_TIME_NOW, Int64(time * Double(NSEC_PER_SEC)))

dispatch_after(delay, dispatch_get_main_queue()) {
    
    closure()
 }

}

//图片点击通知
//用结构体封装点击图片通知的名字和userInfo的key值
struct ImageViewDidSelectedNotificationKey{
  
    var selectedIndexKey = "selectedIndex"
    var urlKey = "urls"
    var notificationName = "imageViewDidSelectedNotification"
}

let selectedNotificationStrut = ImageViewDidSelectedNotificationKey()